package com.online.teaching.dao;
import com.online.teaching.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

/****
 * @Author:admin
 * @Description:User的Dao
 * @Date 2019/6/14 0:12
 *****/
public interface UserMapper extends Mapper<User> {
    /**
     * 根据账号查询用户
     * @param account
     * @return
     */
    @Select("select * from user where user_account=#{account}")
    User findUserByAccount(String account);

    /**
     * 根据类型以及认证id查询用户
     * @param userType
     * @param userIdentiId
     * @return
     */
    @Select("SELECT * from `user` WHERE user_type=#{user_type} AND user_identi_id=#{user_identi_id}")
    User findUserByTypeAndIId(@Param("user_type") Integer userType,@Param("user_identi_id") Integer userIdentiId);
}
